import { createAction } from '../utils/redux'

import { HOME_BANNER_LIST, HOME_PROD_TAG_LIST, HOME_PROD_LIST_BY_TAG_ID } from '../constants/home'
import { API_BANNER_LIST, API_PROD_TAG_LIST, API_PROD_LIST_BY_TAG_ID } from '../constants/api'

/**
 * 首页banner
 * @param {*} payload 
 */
export const dispatchHomeBannerList = payload => createAction({
    url: API_BANNER_LIST,
    type: HOME_BANNER_LIST,
    payload
})

/**
 * 商品分组标签接口
 * @param {*} payload 
 */
export const dispatchHomeProdTagList = payload => createAction({
    url: API_PROD_TAG_LIST,
    type: HOME_PROD_TAG_LIST,
    payload
})
/**
 * 商品分组标签接口
 * @param {*} payload 
 */
export const dispatchHomeProdListByTagId = payload => createAction({
    url: API_PROD_LIST_BY_TAG_ID,
    type: HOME_PROD_LIST_BY_TAG_ID,
    payload
})